// import Vue from 'vue'
// Vue.directive('imgerror', {
//   inserted(el, binding) {
//     el.onerror = function() {
//       console.log('出错')
//       el.src = binding.value
//     }
//   }
// })

export const imgerror = {
  inserted(el, binding) {
    el.onerror = function() {
      console.log('出错')
      el.src = binding.value
    }
  }
}
